import request from "@/utils/request";

export function elderhealth(method, data) {
  if (method == "post") {
    return request({
      url: "/elderhealth",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/elderhealth",
      method: method,
      params: data,
    });
  }
}
export function eldermeal(method, data) {
  if (method == "post") {
    return request({
      url: "/eldermeal",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/eldermeal",
      method: method,
      params: data,
    });
  }
}
export function eldermedicine(method, data) {
  if (method == "post") {
    return request({
      url: "/eldermedicine",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/eldermedicine",
      method: method,
      params: data,
    });
  }
}
export function elderhealthtest(method, data) {
  if (method == "post") {
    return request({
      url: "/elderhealthtest",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/elderhealthtest",
      method: method,
      params: data,
    });
  }
}
export function healthData(method, data) {
  if (method == "post") {
    return request({
      url: "/data/health",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/data/health",
      method: method,
      params: data,
    });
  }
}
export function healthRecord(method, data) {
  if (method == "post") {
    return request({
      url: "/eldertest",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/eldertest",
      method: method,
      params: data,
    });
  }
}
